package com.yl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yl.entity.UserEntity;
import com.yl.utils.R;

import java.io.UnsupportedEncodingException;


/**
 * 用户表
 *
 * @author zlj
 * @email 328727561@qq.com
 * @date 2024-04-17 11:28:08
 */
public interface UserService extends IService<UserEntity> {


    /**
     * 根据用户名获取到对应的数据
     * @param username
     * @return
     */
    UserEntity findUserByUserName(String username);

    /**
     * 根据手机号查询用户
     * @param username
     * @return
     */
    UserEntity findUserByPhone(String username);

    /**
     * 注册用户
     * @param user
     * @return
     */
    R register(UserEntity user);

    /**
     * APP登录接口
     * @param user
     * @return
     */
    R getAppLogin(UserEntity user);

    /**
     * 生成短信验证码
     * @param phone
     * @return
     */
    R getSMSCode(String phone);

}

